<%--
    老师对同学任务的操作
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        table{
            width: 1200px;
        }
        tr,td{
            border: grey 1px ;
        }
        td{
            height: 40px;
        }

        table td{
            height: 60px;
            vertical-align: middle!important;  /*设置文字垂直居中*/
            text-align: center;
        }

        tr,td{border-right:1px solid #888;border-bottom:1px solid #888;padding:5px 15px;}

        th{font-weight:bold;background:#ccc;}

        .con-b .row .lf{
            width: 15%;
            text-align: center;
            padding: 10px;
        }
        .con-b .row .rg{
            width: 85%;
        }

        .con-b tr:nth-of-type(odd){
            background-color: #f2f2f2;
        }

    </style>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
</head>
<body>
<table border="1" cellspacing="0" align="center" class="con-b">
    <thead>
    <%--userId,studentAnswer,taskAccount,isFinsh,isScore,studentQuestion,teacherView--%>
    <tr class="row" style="color: black;font-size: 25px" >
        <td class="lf">学生姓名</td>
        <td class="lf">任务序号</td>
        <td class="lf">作答情况</td>
        <td class="lf">完成情况</td>
        <td class="lf">得分情况</td>
        <td class="lf">学生反馈</td>
        <td class="lf">老师评价</td>
        <td class="lf">修改</td>
        <td class="lf">删除</td>
    </tr>
    </thead>
    <tbody>
    <tr>
        <c:forEach items="${arr}" var="person">
            <td class="lf">${person.getStudentName()}</td>
            <td class="lf">${person.getTaskAccount()}</td>
            <td class="lf">${person.getStudentAnswer()}</td>
            <td class="lf">
            <c:if test="${person.getIsFinsh()==0}">
            <span style="color: red">未完成</span>
            </c:if>
                <c:if test="${person.getIsFinsh()==1}">
                    <span style="color: green">已完成</span>
                </c:if>
            </td>
            <td class="lf">${person.getIsScore()}
            <img src="fix.png" onclick="updateScore()">
            </td>
            <td class="lf">${person.getStudentQuestion()}</td>
            <td class="lf">${person.getTeacherView()}</td>
            <td> <img src="fix.png" onclick=
                    "fixTTS('${person.getUserAccount()}','${person.getTaskAccount()}')"
                      style="left: 30px"></td>
            <td> <img src="delete.png" onclick=
                    "deleteTTS('${person.getUserAccount()}','${person.getTaskAccount()}')"
                      style="left: 30px"></td>
        </c:forEach>
    </tr>

    </tbody>


</table>

</body>

<script>
    function deleteTTS(userAccount,taskAccount){
        window.location.href
        ("tea.action?action=deleteTTS&userAccount="+userAccount+"&taskAccount="+taskAccount)
        alert("删除成功")
    }

    function fixTTS(userAccount,taskAccount) {
        window.location.href
        ("tea.action?action=fixTTS&userAccount="+userAccount+"&taskAccount="+taskAccount)
        alert("修改成功")
    }



</script>


</html>

